<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<jsp:include page="/admin/jsp/common/HtmlHead.jsp"/>
	<title>Insert title here</title>
	<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery-1.9.1.min.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery.validate.min.js"></script>
	<script type="text/javascript">
	$(function(){
		$("form").validate({
			rules:{
				'subject.name':{
					required:true,
					maxlength:200
				}
			},
			messages:{
				'subject.name':{
					required:'请输入新闻标题',
					maxlength:'请输入小于{0}个字符'
				}
			}
		});
	});
	</script>
</head>
<body>
	<div id="page_main">
		<div class="top_bar">
			<span class="sta_pos">当前位置：</span><span>系统管理</span>
			&gt;
			<s:if test="subject.id>0">
			<span>编辑科目</span>
			</s:if><s:else>
			<span>添加科目</span>
			</s:else>
		</div>
		<div class="edit_ctn">
			<s:form action="editDo" method="post">
				<s:hidden name="subject.id"/>
				<table width="100%" border="0" class="edit_tab" cellpadding="0" cellspacing="0">
					<tr>
						<th style="widht:25%;"><span class="error">*</span>&nbsp;科目名称</th>
						<td style="width:75%;">
							<s:textfield name="subject.name" cssClass="txt" style="width:420px;" maxlength="200"/>
						</td>
					</tr>
					<tr>
						<td style="border-right: none;">&nbsp;</td>
						<td>
							<a class="btn" href="javascript:document.getElementById('btn_submit').click()"><span>提交</span></a>
							<a class="btn" href="javascript:window.history.go(-1);" style="margin-left:24px;"><span>返回</span></a>
							<input type="submit" value="提交" style="display:none;" id="btn_submit"/>
						</td>
					</tr>
				</table>
			</s:form>
		</div>
	</div>
</body>
<jsp:include page="/admin/jsp/common/errorMessage.jsp"/>
</html>